<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Using libdpsearch library</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="DataparkSearch Engine 4.52"
HREF="index.en.html"><LINK
REL="UP"
TITLE="Miscellaneous"
HREF="dpsearch-misc.en.html"><LINK
REL="PREVIOUS"
TITLE="Miscellaneous"
HREF="dpsearch-misc.en.html"><LINK
REL="NEXT"
TITLE="Database schema"
HREF="dpsearch-dbschema.en.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="datapark.css"><META
NAME="Description"
CONTENT="DataparkSearch - Full Featured Web site Open Source Search Engine Software over the Internet and Intranet Web Sites Based on SQL Database. It is a Free search software covered by GNU license."><META
NAME="Keywords"
CONTENT="shareware, freeware, download, internet, unix, utilities, search engine, text retrieval, knowledge retrieval, text search, information retrieval, database search, mining, intranet, webserver, index, spider, filesearch, meta, free, open source, full-text, udmsearch, website, find, opensource, search, searching, software, udmsearch, engine, indexing, system, web, ftp, http, cgi, php, SQL, MySQL, database, php3, FreeBSD, Linux, Unix, DataparkSearch, MacOS X, Mac OS X, Windows, 2000, NT, 95, 98, GNU, GPL, url, grabbing"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000C4"
VLINK="#1200B2"
ALINK="#C40000"
><!--#include virtual="body-before.html"--><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>DataparkSearch Engine 4.52: Reference manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="dpsearch-misc.en.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 9. Miscellaneous</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="dpsearch-dbschema.en.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="LIB"
>9.2. Using <TT
CLASS="LITERAL"
>libdpsearch</TT
> library</A
></H1
><A
NAME="AEN5596"
></A
><P
>The <TT
CLASS="LITERAL"
>libdpsearch</TT
> is available
for using it in third party applications. You can easily add search
into your own application using library and include files installed in
<TT
CLASS="FILENAME"
>/lib</TT
> and <TT
CLASS="FILENAME"
>/include</TT
> 
<SPAN
CLASS="APPLICATION"
>DataparkSearch</SPAN
> directories. Each application which uses
<TT
CLASS="LITERAL"
>libdpsearch</TT
> must have <TT
CLASS="FILENAME"
>dpsearch.h</TT
> header file
included.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="LIB-DPSCONF"
>9.2.1. <TT
CLASS="FILENAME"
>dps-config</TT
> script</A
></H2
><P
>When compiled with one of supported SQL
back-end, <TT
CLASS="LITERAL"
>libdpsearch</TT
> requires some dependent libraries, for example
<TT
CLASS="LITERAL"
>libmysqlclient</TT
>. You can find <TT
CLASS="FILENAME"
>dps-config</TT
> script in
<TT
CLASS="FILENAME"
>/bin</TT
> directory of <SPAN
CLASS="APPLICATION"
>DataparkSearch</SPAN
> installation. This script helps to take
in account required dependencies. <TT
CLASS="FILENAME"
>dps-config</TT
> script can take several
options in it's command line. By default <TT
CLASS="FILENAME"
>dps-config</TT
> outputs all
available options:</P
><P
>			<PRE
CLASS="PROGRAMLISTING"
>Usage: ./dps-config [OPTIONS]
Options:
        [--version]
        [--libs]
        [--cflags]</PRE
>
		</P
><P
>When executed with <CODE
CLASS="OPTION"
>--libs</CODE
>
command line option <TT
CLASS="FILENAME"
>dps-config</TT
> outputs all required to <TT
CLASS="LITERAL"
>libdpsearch</TT
>
linker flags, for example:
		<PRE
CLASS="PROGRAMLISTING"
># ./dps-config --libs
-lm -L/usr/local/mysql/lib/mysql -lmysqlclient \
-L/usr/local/dpsearch/lib -ldpsearch</PRE
>
		</P
><P
>So you may insert <TT
CLASS="FILENAME"
>dps-config</TT
> <CODE
CLASS="OPTION"
>--libs</CODE
> into CC compiler command line:
		<PRE
CLASS="PROGRAMLISTING"
>cc myprog.c -o myprog `dps-config --libs`</PRE
>
		</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="API"
>9.2.2. <SPAN
CLASS="APPLICATION"
>DataparkSearch</SPAN
> API</A
></H2
><P
>There is no detailed description of <SPAN
CLASS="APPLICATION"
>DataparkSearch</SPAN
>
API yet. This is because API is currently under rapid development and
may  have major changes from version to version. You may use
<TT
CLASS="FILENAME"
>search.c</TT
> as an example of application which uses
<TT
CLASS="LITERAL"
>libdpsearch</TT
> library.</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="dpsearch-misc.en.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.en.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="dpsearch-dbschema.en.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Miscellaneous</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="dpsearch-misc.en.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Database schema</TD
></TR
></TABLE
></DIV
><!--#include virtual="body-after.html"--></BODY
></HTML
>